package com.weasel.weixin.commons.message.builder.initiative;

import com.weasel.weixin.commons.message.bean.initiative.VideoCustomInitiativeMessage;

/**
 * Created by Dylan on 2015/10/19.
 */
public class VideoCustomInitiativeMessageBuilder extends AbstractCustomInitiativeMessageBuilder<VideoCustomInitiativeMessageBuilder,VideoCustomInitiativeMessage> {


    public VideoCustomInitiativeMessageBuilder() {
        super(new VideoCustomInitiativeMessage());
    }

    public VideoCustomInitiativeMessageBuilder mediaId(String mediaId){

        getVideo().setMediaId(mediaId);
        return this;
    }

    public VideoCustomInitiativeMessageBuilder title(String title){

        getVideo().setTile(title);
        return this;
    }

    public VideoCustomInitiativeMessageBuilder description(String description){

        getVideo().setDescription(description);
        return this;
    }

    public VideoCustomInitiativeMessageBuilder thumbMediaId(String thumbMediaId){

        getVideo().setThumbMediaId(thumbMediaId);
        return this;
    }

    private VideoCustomInitiativeMessage.Video getVideo(){

        VideoCustomInitiativeMessage.Video video = ((VideoCustomInitiativeMessage)message).getVideo();
        if(null == video){
            video = new VideoCustomInitiativeMessage.Video();
            ((VideoCustomInitiativeMessage) message).setVideo(video);
        }
        return video;
    }
}
